home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-10-25 | 30.3 KB | 576 lines | [TEXT/PSIA] |
-
- PSI 1.0/10-25-1989
-
- Personal System for Information Management and Retrieval
-
- ⌐ 1989 Markus P.J. Fromherz
- p-mail: Institut fƒr Informatik der Universitèt Zƒrich
- Winterthurerstr. 190
- CH-8057 Zƒrich
- e-mail: fromherz@ifi.unizh.ch
-
- This application has been written entirely in Prolog, using
- LPA MacProlog¬ 2.5, a formidable product from Logic
- Programming Associates Ltd., London, England. The development
- and runtime software are copyright of LPA.
-
- My special thanks go to Christoph, Heike, Norbert, Stella
- and Tony, who help me beta-testing this application.
-
- This text has been formatted for display in a non-
- proportional font like Monaco or Courier.
-
-
- DISTRIBUTION POLICY
-
- Please feel free to copy PSI and give it to other Macintosh users for their
- evaluation. Always include this document. I retain all rights to this
- software and its documentation, which may not be sold, either separately or as
- part of another product, without my written approval. This notice may not be
- altered or removed.
-
- ! PSI is free for personal use. If you decide to use PSI, please send me a post
- card of your home town. This way, you may even get a free update (only by
- e-mail or if you pay the transportation, i.e. disk and stamps).
-
- ! If you intend to use PSI for commercial business or just want to become a
- registered user, with the advantage of getting updates and the right to ask
- for additional functionality, send whatever you think you should pay (the
- equivalent of about sFr. 20 or $20), just to make sure I don╒t pay the price
- for the additional effort (time, postage etc.). PSI is not free for
- commercial use!
-
- Don╒t forget the post card!
-
-
- OVERVIEW
-
- PSI helps with the management and retrieval of information, which may be
- bibliographic references, addresses, software, CD references etc.
- Information is saved in records, in the following called cards, which are
- described (defined or grouped) by schemata; a simple card description language
- allows to define fields and layout. A file of information might thus be
- compared to a register. Descriptors help to annotate the cards and, above all,
- to quickly retrieve the information. The information of the cards may be
- exported (listed or printed) in any format; a simple export description
- language allows to define arbitrary print procedures. Information may also be
- imported from data bases (fixed format) or files where the information is
- ordered by keywords (like Refer); a simple import description language allows
- to define arbitrary read procedures.
-
- PSI is intended to be an application for your personal data. It does not claim
- to be a full-fledged data-base system. Instead, it should be easy to set up
- and to use PSI. It is comparably small, versatile and useful for a broad range
- of data. The search by descriptors makes retrieval fast and handy, and the
- export and import capabilities are quite powerful.
-
- ! The following help information is mainly structured by functions and their
- menus and buttons. Introductions and sample sessions help experience the
- functionality. If you use PSI for the first time, it may be a good idea to
- load this text in PSI (or start PSI by double-clicking on this file) and try
- the sample sessions while reading this text.
- Wherever you are, you may select ╥Texts:Help╙ to get information about what
- you are currently doing. The help facility is sensitive mainly to the active
- window.
-
-
- SAMPLE FIRST SESSION
-
- 1 Create a new file and define a new schema:
- a Define a new file with ╥File:New ╔╙.
- b Select ╥Schema:Schema╙ and a dialogue window ╥Schema╙ appears;
- enter ╥Address╙, the name for your first schema, in the field ╥Name╙,
- position the cursor to the field ╥Fields╙ and enter
- Name, 3, Title, 1, "Home:", 3, Street, 3, ZIP Code, 1, City, 2
- Press the button ╥Add╙ to define the schema.
- You now defined a schema ╥Address╙ with the fields ╥Name╙, ╥Title╙,
- ╥Street╙, ╥ZIP Code╙, and ╥City╙, and with the additional text ╥Home:╙.
- c Press the button ╥Close╙ to close the window ╥Schema╙.
-
- 2 Add and find cards of your schema:
- a Select ╥Schema:Address╙ to open the dialogue window for your schema
- ╥Address╙.
- b Enter a sample address in the fields of the window and press the button
- ╥Add╙. You now defined a new card for the schema ╥Address╙.
- c Add more cards to ╥Address╙ by repeating the last step.
- d Check if all fields of the window are empty (press ╥Clear╙ if not) and
- press ╥Find╙. If you have entered several cards, a menu window offers all
- names of the address you defined; if only one card exists, it is displayed
- immediately.
- e If several cards where found, you may browse through these with the ╥<<╙
- and ╥>>╙ buttons.
-
- 3 Define descriptors:
- a Select ╥Schema:Descriptors╙ to open the descriptor-handling window. Enter
- descriptors (like ╥relative╙, ╥friend╙, ╥business partner╙), pressing ╥Add╙
- or the Return key after each term.
- b Press ╥Show╙ to see your descriptors (and ╥Okay╙ when you╒ve seen enough).
- c Press ╥Close╙ to close the window.
-
- 4 Describe your cards:
- a Back in the ╥Address╙ window, find and display one of your addresses as you
- did before. (The ╥Modify╙ button should not be dimmed.)
- b Press ╥Descriptors╙, select one or more fitting descriptors for the current
- address and press ╥Okay╙. (Note the term(s) appearing on the ╥Descriptors╙
- line. The current address has been annotated (or indexed) with these
- terms.)
- c Press ╥Modify╙ to replace the old address by the new one. (The entries in
- the window are in turn replaced by the old values, i.e. the window
- represents the old address.)
- d Annotate and modify all your addresses in the same way.
-
- 5 Find cards by templates and descriptors:
- a You may now look for addresses in a more sophisticated way. Fill in one or
- more fields, e.g. type a name in the ╥Name╙ field and press ╥Find╙ (or hit
- the Return key). You may also just type the beginning of a name followed by
- ╥*╙, or the end of a name preceded by ╥*╙. (You thus define a template for
- the addresses you look for.)
- b You may also specify groups of addresses you look for by selecting one or
- more descriptors (press ╥Descriptors╙ and select in the menu window). All
- cards with are indexed by at least these terms will be found.
- c You may search for cards by combining address template and descriptors.
- d Instead of pressing ╥Find╙, you may press ╥List╙ to print all matching
- addresses.
-
- 6 Define export and import procedures:
- (See below on how to define export procedures to list your addresses
- differently, as well as how to define import procedures to read addresses
- from other files. Also look at the examples that accompany PSI.)
-
- 7 Save your information:
- You may save you data with ╥File:Save╙ and quit with ╥File:Quit╙.
-
-
- FUNCTIONS
-
- Ñ File
-
- Ñ New ╔:
- Create new information file.
-
- Ñ Open ╔:
- Load information file. Since only one such file can be loaded, you are
- asked if the current file is to be saved (if it has been changed).
-
- Ñ Save:
- Save the current file.
-
- Ñ Save as ╔:
- Save the current file with a different name and/or in a different folder
- or volume.
-
- Ñ Add ╔:
- Add schemata, cards, export/import procedures and/or descriptors of other
- PSI documents.
- You are presented with the names of all schemata of the selected file and
- the entry ╥All Descriptors╙. Select the items you want to add (from).
-
- Subsequently and for each schema to add, you are presented with a dialogue
- window to choose in which way the schema is to be added. There you can
- choose to add or ignore the new cards, to add the schema definition resp.
- replace the existing schema definition by the new one or not, and to add
- the new export/import procedures, replace the existing ones, or ignore the
- new ones. Finally, you can also choose the name which the schema to be
- added should have in the existing file. If this name already exists, the
- chosen items are added to or replacing the existing items as you chose it.
- NOTE that you can only add a schema (or its cards or procedures) to an
- existing one if the number of fields match.
- New descriptors describing the added cards are automatically added to the
- list of descriptors.
- If you select ╥All Descriptors╙, all descriptors of the chosen file are
- added to the current descriptors.
- NOTE that only schemata of PSI Text documents (option Text file type)
- can be added, i.e. you first have to save a PSI document as PSI Text file
- before you can add from it (see also CONDITIONS and ╥File:Options ╔╙).
-
- Ñ Options ╔:
- Set options for PSI.
- Buttons:
- Card: Set the card window that is to be shown when loading the current
- file. You may choose one of the schemata or ╥- No card -╙. If you
- select a schema, the schema╒s card window is opened automatically
- whenever this file is loaded.
- Log: Set the log file to a file or a window. By default, it set to the
- window ╥Log╙. (╥Reset╙ restores this setting.)
- Write log (radio button): Switch logging on or off.
- File type: Can be either Code or Text. This is automatically set when
- loading a PSI document, and the file will be saved with the same type,
- unless you set it differently in this window. PSI Code documents are
- larger, but can be loaded and saved much faster than PSI Text documents.
- Eval. space: May be increased when dealing with large files. When, say,
- searching or sorting large amounts of cards, you may get the message
- ╥No more memory available╙; you may then increase the evaluation space.
- The number to the right indicates the maximum amount by which the
- evaluation space may be increased. NOTE that since free space may be
- segmented, it is possible that only a part of the memory indicated is
- available. No change will happen in this case. NOTE that the larger the
- application size, the larger the possible evaluation space. You may not
- set an evaluation space of less than 24K. The default is 200K. NOTE
- that you have to close all dialogue windows for the change to come into
- effect.
- Save: The current option settings are written to a file called
- ╥PSI Options╙. Next time you start PSI, the settings of this file are
- used. You may have several such option files and start PSI with them to
- use their options.
- Okay: Close the options window.
-
- Ñ Quit:
- Quit PSI. If your file has been changed, you are asked if you
- want to save it.
-
- Ñ Schema
-
- Ñ Schema:
- Define, modify, delete, or find a schema for your cards (or records). A
- schema has a name, an optional command which appears in the menu, fields,
- optional export procedures and optional import procedures.
- The name of the schema can be anything. The command must be one character.
- The fields have the format ╥Name1, Position1, Name2, Position2, ╔╙, i.e.
- each field has a name and a position, all separated by ╥,╙.
- The field name can be anything, except that it should not begin
- with ╥/╙, ╥(╙, ╥[╙, ╥{╙, or ╥"╙. The position which will be the position
- in its window must be a positive integer. 1 means a short edit field left,
- 2 a short edit field right, and 3 a long edit field; all increments of 3
- to these positions denote the same width, but more lines. (For instance,
- 5 means two short lines right.) Thus, almost all combinations of window
- positions are possible.
- NOTE that PSI does not distinguish key fields, but offers the first
- field whenever you have to select among several cards. Therefore, it is
- advisable to define a prominent field as the first one.
- You may also specify text that is to be printed on the card window,
- writing ╥"Text"╙ (i.e., ╥"╙, your text, and again ╥"╙) instead of a field
- name, and using the same positioning policies. If the Text contains two
- items separated by ╥,╙, the first is written at the field name╒s place,
- the second at the edit╒s place. Otherwise, the Text uses the whole length
- of name and edit field. You may also structure your card window layout
- with ""╒s in you schema definition. An example was in the sample first
- session.
- Export and import can be defined and set by ╥Export/Import╙ (see this
- button). The fields ╥Export╙ and ╥Import╙ reflect the procedures currently
- associated with this schema (currently active).
- Buttons:
- Add: Add the schema currently defined in the window.
- Modify: Replace the schema with this name by the one currently defined
- in the window. In case you change the fields (names or order), there are
- two possibilities: Either you just change the names, i.e. the cards of
- this schema are not affected. Or you change the order of the fields, add
- new ones and/or remove old ones. In the second case, the field values of
- all cards of this schema are rearranged.
- NOTE that you cannot rename and re-order/add/delete fields at the same
- time.
- You may change the name of a schema by giving it a new name and pressing
- ╥Modify╙. You are then asked which schema╒s name you want to replace.
- NOTE that for all modifications involving the schema name or the
- fields╒ number or order, the cards are modified, too.
- Delete: Delete the schema with this name. If cards for this schema
- exist, you are asked if you really want to delete them.
- Find (Return key): Find the schema with this name. If a schema with this
- name could not be found, a scroll menu offers all schemata (except if
- there is only one, which is filled in immediately).
- Clear: Clear the edit fields of this window.
- Close: Close the schema window. In case you didn╒t update your
- changes, you are asked if it is okay to discard the current
- schema definition (i.e., the one in the window).
-
- Export/Import: Get the export/import window for the current schema.
- An export or import procedure is defined by a name and a procedure
- written in a special description format. This procedure can use the
- schema fields, special keywords, or normal text. It is also possible to
- specify alternatives and loops. All these items must be separated by
- ╥,╙, alternatives (also in loops) by ╥;╙.
- Instead of writing the full field name, it is sufficient to write just
- the beginning of its name (should be disambiguous). PSI is first looking
- for an exact match. If none is found, it looks for the first field
- beginning with the name you wrote. SINCE only the first 255 characters
- of an edit field can be read, it is strongly suggested that you use this
- option, and thus avoid overflow if you have long procedures. NOTE also
- that ╥D╙ stands for the descriptors of a card.
- You can define several export and import procedures, of which at most
- one can be active (see button ╥Use╙).
- NOTE that for the procedure definition, the field list of the existing
- schema is taken. Only if the current schema of the schema window is not
- yet defined (added) is its current field list taken. Avoid ╥)╙, ╥]╙
- or ╥}╙ in field names appearing in alternatives or loops; they have a
- special meaning.
-
- EXPORT: Format, Format, ╔
-
- Format prints
- ------ ------
- FieldName value of FieldName
- /eNFieldName Nth element of list FieldName (0,1,╔)
- D the descriptors, separated by ╥,╙
- /eND Nth element of the descriptors (0,1,╔)
- "Text" Text
- /s 1 space
- /sN N spaces
- /t 1 tab
- /tN N tabs
- /n 1 new line
- /nN N new lines
- /l 1 line feed
- /lN N line feeds
- (Format1,Format2,R;F) R if Format1 = Format2, else do (F)
- (Formatx should be field, descriptor or text)
- (Format1,\Format2,R;F) R if Format1 # Format2, else do (F)
- (Formatx should be field, descriptor or text)
- [Format1,R;F] R if Format1 is not empty, else do [F]
- (i.e. like ╥(Format1,\"",R;F)╙)
- {Format,R} R for all elements of list Format (field or D)
- (all reference to Format within R references
- the current element of Format)
- {Format,R;B;L} (R,B) for all elements of list Format except
- for the last two, R for the last but one
- element, L for the last one;
- R if Format contains only one element
- (thus, B may be the text between the elements
- as in ╥{D, D; ", "; " and ",D}╙;
- all reference to Format within R references
- the current element of Format)
-
- ! Sample export procedure:
- Assume the schema of the sample first session (see above) with cards
- like Name Murphy, Eddie
- Title
- Home:
- Street Famous Street, Beverly Hills
- ZIP Code 77001 City: Los Angeles, CA
- To list the addresses as address labels:
- [Title, Title,/s], /e1Name,/s,/e0Name,/n, {Street, Street,/n,},
- City,", ",ZIP Code,/n2
- meaning, if the Title is not empty, print the Title and a space, then
- print the first Name, a space, the last Name and a new line,
- then for each element in the list of streets (separated by ╥,╙), print
- it on an extra line (print nothing if it is empty),
- then print the City, ╥, ╙, the ZIP Code and twice new line.
- Thus, the selected addresses are listed like
- Eddie Murphy
- Famous Street
- Beverly Hills
- Los Angeles, CA, 77001
-
- IMPORT: Format, Format, ╔
-
- Format reads
- ------ -----
- FieldName value for Field
- "Text" Text
- /s till space
- /t till tab
- /n till new line
- /l till line feed
- - any text (will be ignored)
- D descriptors (may be separated by ╥,╙)
- (Format,╔;Format,╔;╔) alternatives; each should be
- Text, FieldName
- (each field appears only once;
- the alternatives should be followed
- by /s, /t, /n, /l, or single-character
- text)
- {Format,╔;Format,╔;╔} loop (several alternatives); each should be
- Text, FieldName
- (each field can be repeated;
- the loop should be followed by two
- of /s, /t, /n, /l, or single-character
- text)
-
- ! Sample import procedures:
- To read cards in Refer format, assuming ╥%N╙ stands for the last name,
- ╥%F╙ for the first name, ╥%T╙ for the title, ╥%S╙ for the street,
- ╥%Z╙ for the ZIP code, ╥%C╙ for the city, and ╥%K╙ for some key words:
- {"%T ",Title; "%N ",Name; "%F ",Name; "%S ",Street;
- "%Z ",ZIP Code; "%C ",City; "%K ",D},/n,/n
- meaning, read a line (i.e. till new line), and if this line starts
- with ╥%N ╙, add the rest to Name, if it start with ╥%F ╙, ╔ and so on;
- stop at an empty new line (the second ╥/n╙). Field names may appear
- more than once (like ╥Name╙); they are all added up. It is possible to
- have more items in one loop alternative, meaning that the line is put
- together from these items.
-
- To read cards in a fixed format (as it often comes from data bases),
- assuming that the fields are separated by tabs and one record is
- separated by a new line from the next one:
- Title, /t, Name, /t, Street, /t, ZIP Code, /t, City, /n
- Note that here and so far, you cannot have a field name appear more
- than once, i.e. fields can only be added up in loops.
- Buttons:
- Export - Import (radio button): Work on export or import procedures,
- i.e. type is either export or import.
- Add (Return key): Add the currently defined procedure as procedure of
- the current type.
- Modify: Modify the procedure with the current name and of the current
- type by the currently defined procedure.
- Delete: Delete procedures of the current type from those offered in a
- scroll menu.
- Show: Show the procedures of the current type in a scroll menu. The
- one selected is brought to the window.
- List: List all procedures of the current type.
- Use: Define procedure of the current name and type as current
- procedure of the schema. Also close the window (see also button
- ╥Close╙).
- Close: Close the export/import window. In case the text in the
- procedure definition field is not a procedure of the current schema,
- you are asked if it is okay to discard it. NOTE that all export/import
- modifications are made permanent instantly for the current schema,
- so you don╒t need to modify the schema for these procedures.
-
- Ñ Descriptors:
- Define and delete descriptors (global descriptor list).
- Buttons:
- Add (Return key): Add the current descriptor. The text in the edit field
- is cleared so that you can enter several descriptors conveniently.
- Modify: Replace another descriptor that is to be selected afterwards by
- the current one. NOTE that the descriptor is also replaced in all
- cards it describes.
- Delete: Delete descriptors from those offered in a scroll menu. NOTE
- that the descriptors are also removed from all cards they described.
- Show: Show the descriptors in a scroll menu. The one selected is brought
- to the window.
- List: List all descriptors.
- Close: Close the descriptors window.
-
- Ñ YourSchema:
- Define, modify, delete, or find cards of this schema. A card consists of
- the values of the schema╒s fields, and of the descriptors it has been
- annotated with.
- A field value can be any term. Its length should not exceed 255.
- If a field value contains commas, the value can be treated as a list, i.e.
- the terms separated by the commas can be addressed individually when
- exporting the value.
- The field ╥Descriptors╙ reflects the descriptors currently associated with
- this card.
- Buttons:
- Add: Add the card currently defined in the window.
- Modify: Replace the current card by the card currently defined in the
- window. The current card is the one last found with Find or accessed
- with Next or Previous, i.e. the Modify operation is only available after
- a Find operation. (This button is alternating with the ╥Pattern╙
- button.) NOTE that after the modification, the OLD card is displayed in
- the card window.
- Delete: Delete the cards that match the card currently defined in the
- window. The same matching rules as for ╥Find╙ apply. If more than one
- matching card was found, you can either delete all of them (ALL button,
- Return key) or select those that are really to be deleted.
- Find (Return key): Find the card which matches the card currently
- defined in the window, i.e. the current card is used as template. If
- more than one matching card was found, a scroll menu offers all matching
- cards.
- As long as you do not press any modifying button, you can browse through
- the set of cards with Next and Previous. You may now modify any of the
- cards you found. To get the same set of cards again after a
- modification, use ╥Pattern╙ and ╥Find╙.
- The match rules for field values are:
- An empty field matches anything.
- ╥Text*╙ matches field values that begin with Text.
- ╥*Text╙ matches field values that end with Text.
- ╥*Text*╙ matches field values that contain Text.
- Anything else matches only terms which look exactly the same.
- The match rule for descriptors is:
- Cards must be described by at least the same descriptors, i.e. the
- current set of descriptors has to be a subset of the descriptors of
- the searched card.
- NOTE that the cards are only distinguished by the first field and your
- selections for the other fields and the descriptors. Therefore, if you
- find a set of cards, of which several have an identical first field,
- only the first card will be displayed. This is also the case for Next
- and Previous.
- Pattern: Recall the card pattern of the last successful Find operation.
- (This button is alternating with the ╥Modify╙ button, i.e. if you want
- to recall the Find pattern directly after a Find operation, you first
- have to press, for example, Clear.)
- >> (Next): Get the next card that matches the settings of the last Find
- operation. The set of cards you go through is exactly the set you were
- presented with after the last Find operation.
- << (Previous): Like Next, but get the previous card.
- Descriptors: Describe (annotate) the current card with descriptors by
- selecting them from the list offered in the scroll menu. (The
- descriptors to be used must be defined by ╥Schema: Descriptors╙.)
- List: List the cards which match the card currently defined in the
- window. The same match rules as for ╥Find╙ apply. The current export
- procedure of the card╒s schema is used to list the cards. If no export
- procedure is defined, a default procedure is used. You are asked whether
- export should be done to a file or window. As long as you export to the
- same file (long button, Return key), this file is not closed and the
- listing is appended to former listings to this file. If you choose a
- different export file the next time you list something, the previous
- file is closed (if it is not a window). You may also close a file
- explicitly by using ╥Texts:Close ExportFile╙.
- Sort: Sort all cards of this schema. You can sort them by any field(s)
- in any order. To indicate the order, mark the fields (fill in the edit
- fields) that are relevant for your order with numbers, beginning with 1.
- For example, you may choose 1 for ╥First name╙, 2 for ╥Name╙ and 3 for
- ╥City╙. After pressing the button, you are asked if you want to sort in
- ascending or descending order.
- The sorting algorithm is most efficient for cards which are only
- slightly in disorder.
- Read: Import cards for the schema of the current card window. The
- current import procedure of this schema is used to read the cards.
- Import can be done from files or windows.
- File: This button and facility is enabled only if a card field with the
- reserved name File has been defined. When pressing this button, the
- file whose name and path is in the respective field is loaded just like
- a normal text file (see ╥Texts:Open ╔╙ and ╥Texts:Path ╔╙). Standard
- Macintosh file names are assumed. If you use a relative path, i.e. just
- the file name or a path beginning with ╥:╙, the path is assumed to be
- relative to the home folder of the current PSI file. This allows to have
- portable file names. NOTE that a text window cannot hold more than 32K
- of text.
- Clear: Clear the edit fields of this window. If the edit fields are
- empty, clear the descriptor selection (i.e. if you click a second time).
- Close: Close the card window. In case you didn╒t update your changes,
- you are asked if it is okay to discard the current card (i.e., the one
- in the window).
-
- Ñ Texts
- Open and close text files, select path names, activate an open window.
-
- Ñ New ╔:
- Create a new text window.
-
- Ñ Open ╔:
- Load a text file into a text window. NOTE that a text window cannot hold
- more than 32K of text.
-
- Ñ Close:
- Close the front text window. NOTE that if the window is an active
- listing or log window, it cannot be closed.
-
- Ñ Close ExportFile:
- Close the currently open export file. Only available if the export file
- is actually a file (and not a window).
-
- Ñ Path ╔:
- Select a path and file name by stepping through the standard file menu.
- The full file name of the selected file is written to the listing window
- (or file). This name can then be copied to a card╒s File field.
-
- Ñ Help:
- Loads the PSI help file if necessary and scrolls to the information
- about the current activity. The help facility is sensitive to the active
- window, i.e. whenever you select ╥Help╙, you get context-sensitive help
- information.
-
- Ñ WindowName:
- Bring this window to the front.
-
- Ñ Edit
-
- Ñ Cut, Copy, Paste:
- Work as usual.
-
- Ñ Balance:
- Extends the cursor to include the next outer pair of matching brackets
- (╥( ) { } [ ]╙). Useful when defining export and import procedures with
- alternatives and loops, but works only for text windows, i.e. you first
- have to copy your procedure to a window (e.g., ╥Listing╙), and back to
- the dialogue window afterwards.
-
- Ñ Select all:
- Works only for text windows.
-
- Ñ Fonts
- Select font type and size of the front display window.
-
-
- For CONDITIONS, CONSTRAINTS, WARNINGS, AND MODIFICATIONS see ╥About PSI╙!
-